<template>
    <div class="feedback-page">
        <Header :title="title" :isWhite="false"></Header>
      <h2 class="title">我的反馈</h2>
      
      <!-- 输入区域 -->
      <van-field
        v-model="feedbackText"
        rows="5"
        autosize
        type="textarea"
        placeholder="请输入您的意见或建议"
        class="input-area"
      />
  
      <!-- 提交按钮 -->
      <van-button 
        type="primary" 
        block
        class="submit-btn"
        @click="handleSubmit"
      >
        提交
      </van-button>
    </div>
  </template>
  
  <script setup>
  import { ref } from 'vue';
  import { showToast } from 'vant';
  import Header from '@/components/Header.vue';
  
  const feedbackText = ref('');
  const title = '我的反馈';
  const handleSubmit = () => {
    if (!feedbackText.value.trim()) {
      showToast('请输入反馈内容');
      return;
    }
    
    // 模拟提交动作
    showToast('提交成功，感谢您的反馈！');
    feedbackText.value = '';  // 清空输入框
  };
  </script>
  
  <style scoped>
  .feedback-page {
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f5f5;
  }
  
  .title {
    color: #333;
    font-size: 24px;
    margin: 20px 0 40px;
    text-align: center;
  }
  
  .input-area {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .submit-btn {
    width: 90%;
    margin: 0 auto;
    border-radius: 8px;
    font-size: 16px;
  }
  
  /* 适配移动端 */
  @media (max-width: 480px) {
    .feedback-page {
      padding: 15px;
    }
    
    .title {
      font-size: 20px;
      margin-bottom: 30px;
    }
    
    .submit-btn {
      width: 100%;
    }
  }
  </style>